package cn.laixueit.service.impl;

import cn.laixueit.mapper.MessageMapper;
import cn.laixueit.pojo.Message;
import cn.laixueit.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;

    @Override
    public void save(Message message) {
        message.setCreatedate(new Date());
        messageMapper.insertSelective(message);
    }
}
